package com.wanxi.test;
//一维数组，所有元素的偶数和
public class SumEvenOneArray {


    public static void main(String[] args) {

        int[] array = {11, 22, 33, 44, 55, 66, 77};
        int sum = 0;
        int length = array.length;

        for (int i = 0; i < length; i++) {

            if (array[i] % 2 == 0) {
                sum += array[i];
            }

        }
        System.out.println(sum);

    }

}
